import request from '@/utils/request'

export default {
  invoiceList(params) {
    return request({
      url: '/v1/invoiceList',
      method: 'get',
      params
    })
  },
  detail(id) {
    return request({
      url: `/v1/invoice/${id}`,
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: '/v1/invoiceAdd',
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: '/v1/invoiceUpdate',
      method: 'post',
      data
    })
  },
  delete(data) {
    return request({
      url: '/v1/invoiceDel',
      method: 'post',
      data
    })
  },
  invoiceTimes(params) {
    return request({
      url: '/v1/invoiceTimes',
      method: 'get',
      params
    })
  },
  invoiceStatus(data) {
    return request({
      url: '/v1/invoiceStatus',
      method: 'post',
      data
    })
  }
}
